package com.mintandleaf.webkits.util;

import com.mintandleaf.webkits.core.WebKitsModuleContext;
import javax.servlet.http.HttpServletResponse;

/**
 * Utility class to show raised error
 * @author teguhh
 */
public class WebKitsErrorMessage {

    @Deprecated
    public static void showError(HttpServletResponse response, Exception paramException){
        try{
            response.getWriter().print(paramException);
        }catch(Exception exc){
            exc.getStackTrace();
        }

    }

    public static void showError(Exception paramException){
        WebKitsModuleContext context=WebKitsModuleContext.getWebKitsActionContext();
        try{
           context.getResponse().getWriter().print(paramException);
        }catch(Exception exc){
            exc.getStackTrace();
        }

    }
}
